home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / p_misc / netconf.arc / PS186.TXT < prev    next >
Text File  |  1988-12-10  |  35KB  |  670 lines

  1. This paper has been submitted to the ARRL 6th Computer Networking Conference.
  2. This file contains text only, formatted for any dumb 80-col wide terminal or
  3. printer.  The block diagram, photo, and schematics have been omitted.
  4.  
  5.                                                                      Page 1 
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                       A High Performance Packet Switch 
  15.  
  16.  
  17.                              Mike Brock, WB6HHV 
  18.                            Franklin Antonio, N6NKF 
  19.                              Tom Lafleur, KA6IQA 
  20.                                  PO Box 9045 
  21.                              La Jolla, CA  92038 
  22.  
  23.  
  24. This paper describes  the  PS-186,  a  high-speed   multiport  packet  switch 
  25. designed to support data rates up to 1 Mbit/second.  It can also be used as a 
  26. local packet node, mail system, or a gateway to other networks.  It  operates 
  27. on 2.1 Watts of power.  The PS-186 was designed by members of the  San  Diego 
  28. Packet Radio Association (SANDPAC).   
  29.  
  30.  
  31. Why We Built It 
  32.  
  33. As requirements grow, existing packet radio hardware is running out of steam.   
  34.  
  35. We believe the advancement of amateur packet  radio  requires  packet  switch 
  36. hardware which will support data rates far in excess of today's standard 1200 
  37. bit/second links.  While 1200 bit/second easily supports one  typed conversa-
  38. tion between two individuals, packet radio channels are shared channels,  and 
  39. must support many users simultaneously.  To operate without  congestion,  the 
  40. channel data rate must be many times higher than the rate desired by an indi-
  41. vidual user.  Growing computer-to-computer communication is also  creating  a 
  42. demand for higher user data rates.  A more reasonable  data  rate  for  local 
  43. area channels is 56 kb/s, with much higher rates,  possibly  1 Mb/s,  on  the 
  44. backbone.   
  45.  
  46. A typical mountaintop requirement might be two 1 Mb/s  ports  (for  point-to-
  47. point links to other mountaintops, say one North, one South), a 56 kb/s local 
  48. radio port (connectivity to individual users), and a  1200  b/s  local  radio 
  49. port (for connectivity with the TNC 1&2 community).  With  such  applications 
  50. in mind, we set forth to build a four-port packet switch capable of operation 
  51. to 1 Mb/s. 
  52.  
  53.  
  54. Design Considerations 
  55.  
  56. The switch should provide a very flexible  modem  interface.    Compatibility 
  57. with existing modem designs was a must, but the modems we hope  to  use  with 
  58. this device haven't been designed yet!  (There  are  promising  developments, 
  59. such as the WA4DSY 56 kb/s modem.)  We don't know what data rates will become 
  60. standard, and some modems will want to generate  their  own  clocks,  so  the 
  61. ports must have external clock options.  We wanted to support modems that de-
  62. rive their own RX bit timing as well as those that do not, async as  well  as 
  63. HDLC link-level protocols, etc.   
  64.  
  65. Processors on existing packet hardware are running out of  address  space  to 
  66. hold sophisticated protocol software, and never really had  the  capacity  to 
  67.                                                                      Page 2 
  68. handle high data rate operations.  We wanted a processor  with  more  address 
  69. space, more speed, and a large installed base, so  that  as  many  people  as 
  70. possible would have access to  development  tools.    Because  remote  packet 
  71. switch locations might be battery operated, the  processor  and  all  support 
  72. circuitry should be available in CMOS versions.  The solution  was  an  Intel 
  73.                                  1                                          2
  74. 80186 processor, running at 8 MHz ,  with  no  wait  states,  and  full  DMA  
  75. support.  This processor, except for low-level I/O functions accessed only by 
  76. I/O drivers, is software  compatible  with  the  IBM PC,  IBM AT,  and  their 
  77. clones, which now have an installed base of over  10  million  units.    More 
  78. sophisticated processors were considered, but none are available at as low  a 
  79. cost, or require as few support chips as the 186. 
  80.  
  81. We felt that developers of complex packet-switch  software  should  have  the 
  82. capability of loading new software into packet switches remotely.  This would 
  83. allow bug-fixes or enhancements to be installed in the network  without  PROM 
  84. burning and mountain climbing.  Painless software upgrading is  essential  if 
  85. we want the networks to evolve.  This requires  that  the  switch  contain  a 
  86. large amount of RAM, securely battery backed,  and  a  secure  mechanism  for 
  87. resetting the hardware remotely to initiate reload.  (Amateur satellites have 
  88. done this for years.)  Some developers might not agree with this  philosophy, 
  89. so the board should contain massive amounts of ROM as well.   We  decided  to 
  90. design the board so that the processor's full 1 Mbyte address space could  be 
  91. populated with a variable mix of RAM and ROM.  This required a  design  using 
  92. 128Kx8 RAM chips that aren't quite available yet, so the design  accommodates 
  93. the use of  smaller  RAMs,  with  a  corresponding  temporary  RAM  limit  of 
  94. 256 Kbytes.  We assume that prices of large  static  RAMs  will  continue  to 
  95. fall, but we added a bus expansion port capable of supporting an external RAM 
  96. board just in case. 
  97.  
  98. We questioned whether some applications might need more radio  ports  and  if 
  99. there should be a disk drive interface to  support  stand-alone  development.  
  100. Adding both the bus expansion port and  a  Small  Computer  System  Interface 
  101. (SCSI) port was the answer.  The  SCSI  port  can  be  used  to  interconnect 
  102. several PS-186 boards, future expansion boards, a TAPR NNC (which also has  a 
  103. SCSI port), disk drives, etc. 
  104.  
  105. Most existing TNCs generate significant RFI. A key issue was,  therefore,  to 
  106. design a packet switch with RF-compatibility in mind.  Because this board has 
  107. more interfaces than most, there are  many  opportunities  to  introduce  RFI 
  108. problems, so we took special care.  We decided  that  all  digital  circuitry 
  109. should be above a complete ground  plane  -  implying  a  multilayer  circuit 
  110. board. 
  111.  
  112. As the feature list grew, affordability became a  major  consideration.    We 
  113. were afraid that we might be designing something so expensive that most  hams 
  114. couldn't afford one.  Our solution was to make the board completely  modular.  
  115. This required  considerable  additional  design  time,  and  lots  of  option 
  116. jumpers.  Almost every chip on the board is now optional.  Only users who re-
  117. quire high-speed operation need install  the  DMA  chips.    Only  users  who 
  118. require a SCSI port need install the SCSI chip.   Ditto  the  real-time-clock 
  119. chip, etc.  Lower cost NMOS chips can be used in place  of  CMOS  devices  in 
  120. most cases.  Peripheral chips slower than the  processor  can  optionally  be 
  121. used by running them on a -:2 clock (with reduced performance of course),  and 
  122. on and on. 
  123.  
  124. 1
  125.  The board is designed to support 12 MHz 80186 chips.  However, because the 
  126. NEC DMA chips are not yet available in 10 or 12 MHz versions, initial boards 
  127. will use 8 MHz processors. 
  128.                                                                      Page 3 
  129. Finally, we hoped it would all fit on one board, and it did!   
  130.  
  131.  
  132. Software Considerations 
  133.  
  134. This switch is intended to serve as a hardware  host  for  all  the  evolving 
  135. packet radio protocols.  We're not taking sides in the  protocol  wars.    We 
  136. expect that the developers of COSI, TEXNET, KA9Q's TCP/IP, and  NET/ROM  will 
  137. all be able to port their  software  to  the  PS-186.    As  described  in  a 
  138. companion paper, Brian Kantor, WB6CYT, is developing a multitasking operating 
  139. system kernel for the PS-186, which may form the basis  for  future  software 
  140. developments. 
  141.  
  142.  
  143. What We Built 
  144.  
  145. A specification summary of what evolved as the PS-186 follows.   As  you  can 
  146. see from this list, the PS-186 is designed to take advantage  of  many  high-
  147. technology chips.  Several other high-tech parts are not  directly  apparent.  
  148. For example: power control for the battery-backed RAMs is simplified  by  the 
  149.                                                                  3
  150. use of Dallas Semiconductor  nonvolatile  controllers,  and  PALs   are  used 
  151. extensively to replace what would otherwise be  very  complex  random  logic.  
  152. Without PALs, the board would have been twice as large.  The  combination  of 
  153. advanced technology and planning for future developments, especially  in  the 
  154. areas of faster chips and larger RAMs, should allow the PS-186 a long life. 
  155.  
  156.  
  157. Processor: Intel 80186  @ 8 MHz 
  158.  Option for 10 or 12 MHz CPU 
  159.  Option for CMOS 80C186 (same speeds) 
  160.  
  161. PROM: 16K to 256K bytes 
  162.  2764 thru 271024 byte-wide EPROMs supported 
  163.  28 or 32 pin devices 
  164.  Optional wait states 
  165.  
  166. RAM: 16K to 1023K bytes 
  167.  Up to eight of 6264, 62256, or 621024 supported 
  168.  28 or 32 pin devices 
  169.  Battery backup optional for each pair of RAMs 
  170.  No wait states 
  171.  
  172. Serial Channels: 2 or 4 ports 
  173.  1 or 2  Zilog 8530A or CMOS 85C30 
  174.  Simultaneous full-duplex DMA on all 4 ports 
  175.  Sync or Async, NRZ or NRZI or bi-phase 
  176.  1X, 16X, or 32X clocks 
  177.  Hardware capable of over 1 Mbit/second on all channels 
  178.  All basic signals: TXD, RXD, RXclk, RTS, CTS, outbound TXclk, inbound TXclk, 
  179.    DTR, CD 
  180.  TTL voltage levels 
  181.  Small daughter boards per serial channel for level conversion or small 
  182.    modems 
  183.  
  184. SCSI Port 
  185.  NCR 5380 or CMOS NCR 53C80 chip 
  186.  SCSI-Plus, initiator or target, ANSI X3T9.2 Compatible 
  187.  
  188. 3
  189.  PALs are Programmable Array Logic chips. 
  190.                                                                      Page 4 
  191. Interrupt Controller 
  192.  Intel 8259A 
  193.  Wired for optional RMX-86 compatibility 
  194.  
  195. DMA:  10 simultaneous DMA channels 
  196.  2 channels inside 80186 -- used to support SCSI port 
  197.  2 NEC 71071 chips provide 8 channels for serial ports 
  198.  
  199. Time-of-Day Clock 
  200.  National DP8571 chip 
  201.  Battery backed 
  202.  
  203. Reset Circuits 
  204.  Power-on reset 
  205.  Manual reset 
  206.  Watchdog timeout reset 
  207.  Remote-reset circuit provides over-the-air reset 
  208.  
  209. General Purpose I/O 
  210.  Bus expansion port w/DMA & interrupt support 
  211.  4 bit option jumper 
  212.  4 uncommitted LEDs 
  213.  
  214. Power 
  215.  5 Volt only operation 
  216.  1.6 Amps using NMOS & ALS-TTL (i.e., 8 Watts) 
  217.  420 mA using all CMOS parts (i.e., only 2.1 Watts!) 
  218.  12 Volt optional distributed to daughter boards only 
  219.  
  220. Board 
  221.  7.75" x 11.5" (same size as two 5.25" disk drives) 
  222.  6-layer construction (GND, VCC, 4 signal layers) 
  223.  
  224.  
  225.  
  226.  
  227. Some Obvious Questions 
  228.  
  229. Q: Can all those ports really  go  that  fast  simultaneously?    Won't  they 
  230. overrun?  Can memory keep up?   
  231.  
  232. A: DMA operations use 4.5 clock cycles on average.  In an 8 MHz machine, that 
  233. means there can be up to 1.8 million byte DMA accesses/second.  All 4  serial 
  234. ports running 1 Mbit/sec RX & TX at the same  time  generate  only  1 million 
  235. bytes/second and would therefore consume a maximum of 56% of  the  memory cy-
  236. cles.  Running four full-duplex  ports  at  1 Mbit/sec  is  an  extremely ag-
  237. gressive configuration, and you would seldom expect  all  8  channels  to  be 
  238. active simultaneously, but even when they  are,  about  half  of  the  memory 
  239. cycles are still available for the processor.   
  240.  
  241. Q: Is the 186 processor really  capable  of  keeping  up  with  greater  than 
  242. 1 Mbit/second throughput? 
  243.  
  244. A: It depends on how carefully the software is written.  DMA I/O relieves the 
  245. processor of the burden of handling each character, so that the processor now 
  246. need only respond to interrupts at the end of every received and  transmitted 
  247. packet, and perform the protocol processing required by each received packet.  
  248. Consider a configuration with  two  1 Mbit/sec  full-duplex  ports,  such  as 
  249. described on page 1.  Assume a packet size  of  512  bytes,  and  both  ports 
  250. saturated with traffic.  At 1 Mbit/sec,  that's  one  packet  arriving  every 
  251. 2 milliseconds.  First we look at how many instructions the 186  can  execute 
  252.                                                                      Page 5 
  253. in that time.  On average, the processor's  speed  is  determined  by  memory 
  254. access.  A word access uses 4 clock cycles, and an  instruction  requires  on 
  255. the average about 2 word accesses.  So in an 8 MHz system, the  186  runs  at 
  256. about 1 million instructions per second (MIPS).  Processor speed  is  reduced 
  257. to about 0.7 MIPS, because DMA activity in this example may require  as  many 
  258. as 28% of the memory cycles.  Finally, in 2 ms of running  at  0.7 MIPS,  the 
  259. 186 can execute about 1400 instructions.  That's enough for carefully written 
  260. software to process the average packet and send it on its  way.    Note  that 
  261. packet size is an important parameter on high data  rate  links,  because  it 
  262. determines  the  maximum  packet  arrival  rate,  and   therefore   processor 
  263. throughput.   
  264.  
  265. Q: Is it really necessary to build your own custom processor board  in  1987?  
  266. Why not use a personal computer or clone board?   
  267.  
  268. A: Existing PCs and clones don't have the required I/O capacity.  They aren't 
  269. battery backed.  They draw too much power.  IBM PC system board clones, which 
  270. are attractively priced, have only byte-wide memory, hence lack the processor 
  271. speed or memory cycles to support the I/O we have in mind.  They  do  contain 
  272. three DMA  channels,  but  design  constraints  keep  them  from  being  used 
  273. simultaneously.  The IBM AT system board comes closer, but it still has  some 
  274. awkward DMA limitations, it would require the addition of  a  fairly  complex 
  275. I/O board, it still wouldn't be battery backed, and would draw too much power 
  276. for many applications.  The MAC II has the same problems at a  higher  price.  
  277. Personal computers weren't designed to be packet switches. 
  278.  
  279. Q: Why no power supply on the board?   
  280.  
  281. A: We didn't want to put a series-pass regulator for  12V  operation  on  the 
  282. board because it would dissipate over  14 Watts  in  the  worst  case  (fully 
  283. loaded NMOS).  We didn't want to design in a switching power  supply  because 
  284. we aren't power-supply engineers.  Besides, this board is designed to be part 
  285. of a system.  There will be  some  modems  also  needing  power.    A  single 
  286. external power supply for the PS-186 and modems seemed a reasonable solution. 
  287.  
  288. Q: Why TTL I/O?  Why no RS-232?   
  289.  
  290. A: Most of the modems we had in mind use or will use TTL I/O.  Others may use 
  291. V.35 or RS-422,.  RS-232 interfaces are the exception rather than the rule at 
  292. data rates above 19.2 kb/s.  Each serial port  provides  a  connector  for  a 
  293. small daughter board which can contain  level  translators,  and  appropriate 
  294. connectors.  A daughter board which converts a port to  RS-232  has  been de-
  295. signed for those applications requiring RS-232.   
  296.  
  297.  
  298. Detailed Circuit Descriptions 
  299.  
  300. The following describes the PS-186 hardware in considerable detail.    Casual 
  301. readers may wish to skip to the next section.  It will be useful to refer  to 
  302. the block  diagram  and  schematic.    Reference  designators  refer  to  the 
  303. schematic. 
  304.  
  305. 80186 Microprocessor 
  306.  
  307. The Intel 80186 microprocessor at U12 provides the central core  of  the  PS-
  308. 186.  This processor is capable of directly addressing up to 1 Mbyte  of mem-
  309. ory and 64 kbytes of I/O.   The  80186  has  many  useful  features  (on-chip 
  310. address decoding, wait-state generation, DMA controllers, and counters),  and 
  311. we use most of them.   The on-chip memory and  I/O  decoding  simplifies  and 
  312. reduces the logic.  One of the two DMA channels is used to support an option-
  313. al SCSI port and the timers are used for various software  functions.  Unused 
  314.                                                                      Page 6 
  315. CPU features (one  DMA channel, timer/counter inputs, etc.) are accessible at 
  316. W16, W20, E1, and E2. 
  317.  
  318. The processor is buffered by chips U8, U9, U13, U14, and U27.  This  improves 
  319. circuit loading characteristics, provides isolation,  and  demultiplexes  the 
  320. processor's address and data lines.  U31 buffers the read and write lines and 
  321. separates them into memory read, memory write, I/O read, and I/O write.   The 
  322. I/O write signal is delayed by flip-flop U30 to provide data setup  time  for 
  323. peripherals. 
  324.  
  325. Clock speed configuration jumpers W21 and W25 permit the use of various speed 
  326. parts.  The top frequency of the board  (2x  CPU  clock)  is  established  by 
  327. hybrid oscillator Y1.  
  328.  
  329. EPROMs 
  330.  
  331. Two byte-wide EPROM sockets are provided at U2 and U17.  Each EPROM  supplies 
  332. one byte of a 16-bit word. Address configuration  jumpers  W2,  W3,  and  W18 
  333. specify 16K x 8 chips (2764s) up to 128K x 8 chips (271024s).    The  maximum 
  334. amount of EPROM is 256 kbytes. 
  335.  
  336. The EPROMs reside at the very top of the CPU memory space, which is where the 
  337. processor starts executing after it wakes up from a  reset.  Software config-
  338. ured EPROM sizing determines how far  down  in  memory  EPROM  extends.  This 
  339. dynamic mapping of high memory allows, for example, programs to map in EPROM, 
  340. read some data tables, and then map RAM back in.  This scheme makes  possible 
  341. memory configurations greater than 1 Mbyte, even  though  the  processor  can 
  342. only see 1 Mbyte at any time.  The minimum software configurable EPROM  is  1 
  343. kbyte. 
  344.  
  345. The CPU, under program control, can insert up to three wait  states  allowing 
  346. the use of almost any speed EPROM. 
  347.  
  348. RAM 
  349.  
  350. The PS-186 has space for up to four pairs of byte  wide  static  RAMs  (eight 
  351. devices) at U3 & U18, U4 & U19, U5 & U20, U6 & U21.  Three sizes of RAM  chip 
  352. can be used, 8K x 8 (6264), 32K x 8 (62256), or 128K x 8  (621024),  selected 
  353. by W5, W27, and W28.  A board  configured with eight 128K x 8 RAMs  uses  the 
  354. full 1 Mbyte CPU address space, with some of the top-most locations  lost  to 
  355. EPROM as previously discussed. 
  356.  
  357. RAM is optionally battery backed.  Power  for  each  pair  of  RAM  chips  is 
  358. individually configured for Vcc or a battery source by W4, W6,  W7,  and  W8. 
  359. The optional battery  with  all  the  switching  and  isolation  required  is 
  360. included on the board.  U36 provides the final section of  RAM  decoding  and 
  361. power isolation when a battery is used.  A lower cost chip at U35  does  this 
  362. if battery backup is not required.  The RAM isolation chip can switch  up  to 
  363. 40 uA of backup power to the RAM.  If the total RAM standby  current  exceeds 
  364. this, an optional power control chip can be installed at U44 and  enabled  by 
  365. jumper W33.  W15 is used if there is no battery in the system. When  deciding 
  366. whether to include a  battery,  keep  in  mind  that  the  time-of-day  clock 
  367. requires a battery if it is to continue timekeeping during power failures. 
  368.  
  369. PAL U28 determines how much memory space the processor has allocated to EPROM 
  370. and prevents the CPU from accessing RAM in that address range.  It steers the 
  371. memory write signal so byte writes don't disturb the other half of the  word, 
  372. and uses the RAM size configuration to determine which RAM pair to enable. 
  373.                                                                      Page 7 
  374. Serial Channels 
  375.  
  376. Two Zilog 8530s at U54 and U55 provide four full duplex serial channels  with 
  377. modem control. The 8530s support synchronous  and  asynchronous  serial  line 
  378. formats including support of bit and  byte  oriented  synchronous  protocols.  
  379. These chips include baud rate generators as well as  phase  lock  loop  clock 
  380. recovery circuits.  Clock option jumpers  allow the use of any speed 8530. 
  381.  
  382. One of the unique features of the PS-186 is the 8530 control circuitry.  This 
  383. circuit  takes  care  of  the  special  timing  requirements  of  the  8530s, 
  384. eliminating the need for special programming, and allowing full use  of  DMA.  
  385. The circuitry optimizes system performance by overlapping 8530  valid  access 
  386. recovery times and blocking DMA requests from individual 8530s while they are 
  387. recovering.  This maximizes the time available to the CPU.  It also maximizes 
  388. 8530 access since one 8530 can be serviced while  the  other  is  recovering. 
  389. Recovery time is configured by W39, which specifies time  constants  for  the 
  390. two timing counters (U50 and U51).  The counters are controlled  by  PAL  U53 
  391. which performs timing optimization.  The PAL also combines the  read,  write, 
  392. and reset signals for the 8530s. 
  393.  
  394. The 8530 interrupt acknowledge is synchronized  by  the  flip-flops  at  U33.  
  395. This allows full use of the 8530's interrupt vectors. 
  396.  
  397. An extensive set of serial clock options is provided for each  channel.  W19, 
  398. W22, W23, and W24 configure the outgoing transmit  clock,  incoming  transmit 
  399. clock, and incoming receive clock for channels A, B, C, and D,  respectively. 
  400. Provisions are made for 32x, 16x and 1x clocks.  Options  specifically  allow 
  401. for a 32x or 16x baud rate clock from the 8530  to  be  divided  down  to  1x 
  402. externally and sent back to the 8530, making it possible to receive using the 
  403. internal phase lock loop while maintaining a steady transmit rate. 
  404.  
  405. The serial port connectors (J5, J6, J7, and J8  for  channels  A  through  D, 
  406. respectively)  are  16-pin  header  strips.  All  of  the  signals  on  these 
  407. connectors are TTL.  The board is layed out to accept small  daughter  boards 
  408. which are  large  enough  to  contain  an  RS-232  interface,  a  TAPR  modem 
  409. disconnect interface, or even a full 1200 baud 202 modem.  Filtered  +5V  and 
  410. +12V power is supplied to each connector.  Signals supported on the connector 
  411. are: transmit data, receive data,  RTS,  CTS,  DTR,  DCD,  incoming  transmit 
  412. clock, outgoing transmit clock, and incoming receive clock. 
  413.  
  414. A  byte multiplexer formed by U10, U15, and controlled by PAL U34,  lets  the 
  415. 8530s  respond to byte addresses.  The multiplexer allows DMA operations with 
  416. the 8530s to access sequential byte locations.  The PAL also  picks  up  some 
  417. housekeeping functions to reduce part count. 
  418.  
  419. DMA Channels 
  420.  
  421. There are a total of 10 DMA channels on the PS-186.  Two of them are embedded 
  422. in the processor.  The first processor  DMA  channel  supports  the  SCSI in-
  423. terface.  The second is not associated with any device and may  be  used  for 
  424. memory-to-memory transfers. 
  425.  
  426. The remaining eight DMA channels are provided by two NEC 71071 DMA chips  and 
  427. are dedicated to the serial channels.  Two DMA channels are provided for each 
  428. serial channel, resulting in full-duplex DMA operation.  The  DMA  chips  are 
  429. capable of generating any RAM address without concern for address boundaries.  
  430. The DMA chips do not see EPROM, and they always address RAM regardless of the 
  431. processor memory map.  
  432.  
  433. The DMA circuitry uses the fly-by mode of operation.  This means that  memory 
  434. addresses are generated, I/O addresses are implied, and controls for both are 
  435.                                                                      Page 8 
  436. activated simultaneously.  During this  operation  the  data  is  not  stored 
  437. anywhere, it just "flys by" on the bus, hence the name.  Fly-by  allows  each 
  438. byte DMA operation to complete in an average of 4.5 clock cycles.  At  8 MHz, 
  439. this means over 1.7 million bytes/second, (i.e., over 14 Mbits/second) of DMA 
  440. I/O are possible.  Jumpers W9, W10, W11, W13, W30, and W31 permit  either  or 
  441. both DMA chips to be removed.    
  442.  
  443. Arbitration between DMA chips is provided by PAL U7. The PAL determines which 
  444. controller will get the internal  bus  when  a  conflict  arises.    It  also 
  445. arbitrates bus requests from the expansion port.  Jumper W12 selects fixed or 
  446. round-robin priority for the three requestors. 
  447.  
  448. DMA chip interrupts are latched by U59 before being  sent  to  the  interrupt 
  449. controller.    These  flip-flops  are  cleared  by  accessing  specific   I/O 
  450. locations. 
  451.  
  452. DMA interface to the 8530s is provided by PAL U52 and flip-flops U37 and U39.  
  453. The PAL provides the implied I/O address required for fly-by DMA.  The  flip-
  454. flops provide a way to shut off  the  8530  DMA  requests  once  service  has 
  455. started, and an alternate way to start a transmit data stream.  Accessing the 
  456. I/O port associated with each flip-flop generates the first  request  to  the 
  457. DMA controller.  This eliminates the need for the processor to send the first 
  458. character of each DMA transfer directly  to the 8530. 
  459.  
  460. SCSI Port 
  461.  
  462. To permit connection to other devices (TAPR NNCs,  serial  expansion  boards, 
  463. disk drives, or even other PS-186s) the PS-186 includes an optional NCR  5380 
  464. SCSI controller at U25.  If the physically larger CMOS version of  this  chip 
  465. is preferred it plugs in at U24.  DMA channel 0 of the processor supports the 
  466. SCSI port.  The 220/330 ohm SCSI termination is provided by RN3 and RN4.  W14 
  467. selects an internal or external power source for the  termination.    The in-
  468. ternal power source is filtered and fused before it supplies any  termination 
  469. power, internal or external.  The external SCSI connector, J3, is a  standard 
  470. 50-pin header. 
  471.  
  472. Support for the SCSI chip is provided by the PIO (8255) at U43.   Port  A  of 
  473. the PIO is connected to 8 jumpers (W32) which set the SCSI address.  The com-
  474. bination of an eight bit address and the 5380 chip permits use of  the  SCSI-
  475. Plus enhancements. 
  476.  
  477. Interrupt Controller 
  478.  
  479. Interrupts are handled by both the processor and an Intel 8259 at U40.    The 
  480. processor accepts interrupts and vectors from the  8530s,  and  by  means  of 
  481. cascading, the 8259.  The 8259 accepts interrupts from the  DMA  chips,  SCSI 
  482. chip, time-of-day clock, and bus expansion connector. 
  483.  
  484. Time-of-Day Clock 
  485.  
  486. A National DP8571 at U56 provides full clock calendar functions for  the  PS-
  487. 186.  The chip generates two distinct interrupts based on various  alarm  and 
  488. timing functions.    If  a  battery  is  supplied,  the  chip  will  continue 
  489. timekeeping during power outages.  Trim capacitor C61 adjusts the clock time-
  490. base. 
  491.  
  492. PIO 
  493.  
  494. An Intel 8255 PIO at U43 to provides a number of services to the board.   PIO 
  495. port A supplies the SCSI  port  address  as  discussed  above.    Port  B  is 
  496. connected to W37, a four position jumper block  set  aside  for  software op-
  497.                                                                      Page 9 
  498. tions.  The other four bits of port B read the reset status of the board.  By 
  499. reading these, the software can determine the  source  of  a  hardware  reset 
  500. (power-on, manual, watchdog, remote).  Port C is an output port divided  into 
  501. two halves.  The first  half  drives  the  DTR  lines  on  each  serial  port 
  502. connector.  The other half drives four independent LEDs which are used by the 
  503. software to indicate program status or other conditions.   W1  removes  power 
  504. from the  LEDs when they are not in use. 
  505.  
  506. Watchdog Timer 
  507.  
  508. The reset control chip at U1  provides  three  services.    The  first  is  a 
  509. watchdog function.  If the watchdog I/O location is  not  accessed  at  least 
  510. once every second, U1 generates a hardware reset.  W40  enables  or  disables 
  511. the watchdog.  The second function is a reset switch debounce and  sequencer.  
  512. When switch S1 is pressed or contacts closed on debug connector J2, the board 
  513. is reset and held that way for 250 ms after the switch is released. The third 
  514. function is to hold the board in  a  reset  condition  when  Vcc  is  out  of 
  515. tolerance and for 250 ms after the power stabilizes. This restrains  the  CPU 
  516. during power transients. 
  517.  
  518. Remote Reset Circuit 
  519.  
  520. This circuit provides a remote processor reset capability.    The  4th  radio 
  521.                                                                             4
  522. port, channel D, is monitored for the presence of a 255 bit long pattern (PN   
  523. sequence).  These patterns are long enough so  that  they  will  never  occur 
  524. accidentally  in  random  data  (an  unsquelched  modem  input  may   produce 
  525. continuous random data).  They also contain sequences of  1's  which  violate 
  526. HDLC bit-stuffing rules, so that they cannot occur in valid HDLC frames.   
  527.  
  528. During normal operation, the  8530  SCC  chips  do  bit  synchronization  for 
  529. incoming data.  Unfortunately, the reset circuit must  operate  assuming  the 
  530. processor has crashed, so cannot make use of the 8530s.  PAL  U48  is  an op-
  531. tional bit-timing recovery state-machine.  Jumper W35  selects  NRZ  or  NRZI 
  532. output, or bypasses U48 entirely for those modems that do their own  bit-syn-
  533. chronization.  Jumper W34 selects between the recovered clock or an  optional 
  534. clock from the modem.  PAL U46 searches the input data stream for  the  reset 
  535. sequence. 
  536.  
  537.                                                                 5
  538. The PAL has been programmed to search for one of 12 PN sequences  selected by 
  539. jumper W38.  We didn't want a reset command to accidentally trigger every PS-
  540. 186 within hearing range of the sender.  Our intention is that nearby  PS-186 
  541. nodes will use different reset sequences,  keeping  them  individually reset-
  542. table.   
  543.  
  544. When the reset sequence  is  detected,  the  circuit  causes  a  non-maskable 
  545. interrupt (also optional per jumper W29).  This circuit  interacts  with  the 
  546. watchdog to initiate a timeout.  If the software  does  not  respond  to  the 
  547. interrupt within a second, a hard processor reset is forced.  The need for  a 
  548. remote hard reset is clear.  For those who may want to implement  a  more so-
  549. phisticated soft reset in software, this  circuit  provides  that  capability 
  550. without sacrificing the hard reset needed  when  the  processor  is  severely 
  551. crashed. 
  552.  
  553. 4
  554.  PN sequences are also sometimes called "maximal-length-shift-register-
  555. sequences".  They are patterns of 1's and 0's that are easy to generate, and 
  556. have nice statistical properties. 
  557. 5
  558.  There are 16 PN sequences of length 255, but we ran out of product terms in 
  559. the PAL, so it only searches for 12 of them. 
  560.                                                                     Page 10 
  561. Board Power 
  562.  
  563. Power is supplied to the board through a  standard  4-pin  disk  drive  style 
  564. connector at J1. The board is expected to survive in  noisy  environments  so 
  565. attention was given to filtering and bypassing.  As power enters the board it 
  566. is filtered by ferrite beads and capacitors. At each individual  serial  port 
  567. connector the power is again filtered and bypassed by ferrite  beads  and ca-
  568. pacitors. The liberal use of bypass capacitors and a multilayer circuit board 
  569. with power planes keep the noise and susceptibility down. 
  570.  
  571. Both +5 and +12 Volts are brought in from the power connector but only +5V is 
  572. used on the board.  The +12V is supplied to the  serial  port  connectors  in 
  573. case the daughter boards require it. 
  574.  
  575. Bus Expansion Port 
  576.  
  577. A 60-pin bus expansion connector, J4, provides expandability.    J4  contains 
  578. all the address, data, and control lines necessary to add external peripheral 
  579. devices, bus request and acknowledge lines to support external DMA chips, two 
  580. interrupt lines, and of course, power. 
  581.  
  582.  
  583. Schedule & Availability 
  584.  
  585. The project began in a meeting between KB5MU, KA6IQA, WB6HHV in May of  1985, 
  586. where the basic goals of the project  were  established.    Design  began  in 
  587. earnest a year later.  A wirewrap prototype (see photo) was completed in July 
  588. 1986, test code was running on the  board  in  August,  and  the  design  was 
  589. committed to printed circuit layout in November.  PC layout was completed  in 
  590. July 1987.  At times it seemed our progress gave new meaning to "slow".    In 
  591. retrospect, the only slow parts were "getting started" (an  age-old  schedule 
  592. killer) and the board layout.  We don't fault the people  who  donated  their 
  593. efforts for the 6-layer board layout.  Charity work is necessarily low prior-
  594. ity, so free services don't often fit any particular schedule.   
  595.  
  596. The  present  schedule  calls  for  ten  assembled  and  tested   development 
  597. prototypes to be available in October.    We  feel  lucky  to  have  obtained 
  598. donations from various manufacturers of most of the sophisticated  integrated 
  599. circuits required for the prototype  build.    We  had  to  pay  for  boards, 
  600. sockets, and many of the 'ordinary' ICs.  These protos will be made available 
  601. to  a  (necessarily  limited)  number  of  software   developers   who   have 
  602. demonstrated a capability to produce useful software products to the  amateur 
  603. radio community.  The boards will come with  test  code  and  a  debugger  in 
  604. EPROM, source on 5.25" IBM PC diskette, and a technical manual.  We  hope  to 
  605. make 2nd round production quantity boards available in  January  1988.    The 
  606. distribution mechanism for production boards has not been worked out.   
  607.  
  608. While we can make no guarantees about prices  which  may  be  offered  by  an 
  609. eventual distributor, we hope bare boards will be made  available  for  under 
  610. $75.  All parts on the PS-186 can be purchased in small quantities for  $135. 
  611. (for a minimum configuration) or $300. (maximum) from  suppliers  advertising 
  612. in Byte magazine. 
  613.  
  614. The board and documentation are copyrighted, but rights  are  hereby  granted 
  615. for non-commercial non-profit amateur radio purposes.   Copyright  and  other 
  616. rights are retained by the authors for any and all other purposes. 
  617.  
  618.  
  619. Acknowledgements 
  620.                                                                     Page 11 
  621. We would like to thank Texas Instruments, Motorola, Intel, NEC,  C&K  switch, 
  622. NCR, 3M, Dallas Semiconductor, Siemens, Sony, AMD, Toshiba, Zilog, Panasonic, 
  623. Varta, National Semiconductor, Bourns, Fujitsu, Statek and Hitachi,  as  well 
  624. as their reps and distributors for their donations of parts for the prototype 
  625. boards, and the CAD department  of  M/A-COM LINKABIT  who  donated  PC  board 
  626. layout and artwork generation services.  We would also  like  to  thank  Edye 
  627. Brown for carefully reviewing this paper, and KB5MU and  WB6EME  for  porting 
  628. the debugger.   
  629.  
  630. The authors can be reached by various electronic means: 
  631.  
  632.   Call      CIS ID       Internet 
  633.  
  634. N6NKF     76337,1365     qualcomm@a.isi.edu 
  635. WB6HHV    76246,546      WB6HHV@sdcsvax.ucsd.edu 
  636. KA6IQA    76244,154      lafleur@sdcsvax.ucsd.edu 
  637.  
  638.  
  639. References 
  640.  
  641. 1.Intel Embedded Controller Handbook (1987) 
  642.   [80186 Processor] 
  643.  
  644. 2.Intel 80C186 Target Specification (1986) 
  645.   [80C186 Processor] 
  646.  
  647. 2.Intel Microprocessor and Peripheral Handbook (1987),  
  648.   Volume 1 [8259 interrupt controller], 
  649.   Volume 2 [8255 PIO]. 
  650.  
  651. 3.NEC Microcomputer Products Data Book (1987)  
  652.   Volume 2 [ uPD71071 DMA Controller] 
  653.  
  654. 4.Zilog Components Data Book [8530 Serial I/O] 
  655.  
  656. 5.Dallas Semiconductor Product Data Book [DS1221, DS1232, DS1259 RAM power 
  657.   control chips] 
  658.  
  659. 6.National Semiconductor DP8571 Timer Clock Peripheral (TCP) Data Sheet  
  660.  
  661. 7.NCR 5380-53C80 SCSI Interface Chip Design Manual (3/86)  
  662.  
  663. IBM is a registered trademark of International Business Machines Corporation.  
  664. National is a registered trademark of  National  Semiconductor.    PAL  is  a 
  665. trademark of Monolithic Memories,  Inc.    Intel  is  a  trademark  of  Intel 
  666. Corporation.  SCSI-Plus is a trademark of  AMPRO  Computers.    PS-186  is  a 
  667. trademark of M. Brock, F. Antonio, and T. Lafleur. 
  668.  
  669. 
  670.